#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int flag = 0;
	if(s[0] == '-')
	{
		flag = -1;
		s = s.substr(1);
	}

	reverse(s.begin(), s.end());

	int t = stoi(s);
	if(t && flag)
		cout<<"-"<<t;
	if(!flag)
		cout<<t;
	return 0;
}

